version: '3.3'
services:
        php-apache_env:
                container_name: php-apache
                build:
                        context: .
                        dockerfile: Dockerfile
                depends_on:
                        - db
                volumes:
                        - .:/var/www/html
                ports:
                        - 80:80
        db:
                container_name: db
                image: mysql
                command: --default-authentication-plugin=mysql_native_password
                restart: always
                environment:
                        MYSQL_ROOT_PASSWORD: 123
                volumes:
                        - db-data:/var/lib/mysql
                ports:
                        - 3306:3306
        phpmyadmin:
                image: phpmyadmin
                restart: always
                ports:
                        - 8080:80
                environment:
                        - PMA_ARBITRARY=1
volumes:
        db-data: